// pages/vote/vote.js
var app = getApp()
Page({
    data: {
        userInfo: {},
        name: 'wechat',
        array: [{
            content: '兴趣圈',
            img: '兴趣圈.png'
        }, {
            content: '我的话题',
            img: '我的话题.png'
        }, {
            content: '我的评论',
            img: '我的评论.png'
        }, {
            content: '签到',
            img: '签到.png'
        }]
    },
    //事件处理函数
    bindViewTap: function() {
        wx.navigateTo({
            url: '../logs/logs'
        })
    },
    onLoad: function() {
        console.log('onLoad')
        var that = this
            //调用应用实例的方法获取全局数据
        app.getUserInfo(function(userInfo) {
            //更新数据
            that.setData({
                userInfo: userInfo
            })
        })


    },
    tabClick: function(e) {
        this.setData({
            sliderOffset: e.currentTarget.offsetLeft,
            activeIndex: e.currentTarget.id
        });
    }

})